//
//  AppDelegate.swift
//  Weibo
//
//  Created by 贵永冬 on 16/7/14.
//  Copyright © 2016年 贵永冬. All rights reserved.
//

import UIKit
import SVProgressHUD




@UIApplicationMain
class AppDelegate: UIResponder, UIApplicationDelegate {

    var window: UIWindow?


    func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
        
        SVProgressHUD.setDefaultStyle(SVProgressHUDStyle.Dark)
        SVProgressHUD.setDefaultMaskType(SVProgressHUDMaskType.Clear)
        SVProgressHUD.setCornerRadius(5)
        SVProgressHUD.setDefaultAnimationType(SVProgressHUDAnimationType.Native)
        SVProgressHUD.setFont(UIFont.systemFontOfSize(15))
        
        
        self.window = UIWindow(frame: UIScreen.mainScreen().bounds)
        self.window?.backgroundColor = UIColor.whiteColor()
        
        if isNewVersion() {
            self.window?.rootViewController = GYDNewfeatureViewController()
        }else {
            self.window?.rootViewController = GYDTabBarController()
        }
        self.window?.makeKeyAndVisible()
        
        
        let label = YYFPSLabel(frame: CGRect(x: 10, y: GYDWindowHeight - 49 - 50, width: 60, height: 40))
        self.window!.addSubview(label)
        
        return true
    }
    
}

